Welcome to the Fold Machine. This utility is designed to help programers who work on the same project to “fold” their changes into the master copy of their group’s project.
The assumption under which this application functions is that your programming group keeps a master folder containing the “official” current project and source code. Each programmer has a copy of this folder which he or she uses when writing new pieces of the program. When finished with a new feature the programmer must “fold” his or her changes into the master, that is, go through each file in the master and working folders, copying changes from the working copy to the master folder’s source files. Eventually, the project in the master folder is transformed into the new official current project. This procedure allows several programmers to work on a single project without having to worry if someone else is changing the same source file.
The problem this application addresses is that of figuring out which of perhaps several hundred source files and resources you have changed in making your additions. This can be unbelievably tedious; believably tedious if you have done it before.
The Fold Machine allows you to specify two folders, your working folder and the master, and produces a list of the files that differ between the two folders. This includes files that exist in one folder but not the other and files that exist in both folders but have been changed. The Fold Machine can also compare two resource files and list and/or move the resources that have been changed. The approach here considers your working folder and the master folder to refer to those folders and all folders that are inside of them.
History
This product started out as an in-house tool. It was originally designed just to compare the text files in two folders, returning a list of the files that were different. That was version 1.0
Version 1.2 added a comparison of two resource files.
Version 1.5 corrected the scanning scheme and restricted the file comparison to only text files. Some preferences were also added in this version.
Version 1.8 added a last-folded-date feature.
Version 1.9 was a clean-up version. Animated cursors were added and the selection of the last folded date feature was changed.
Version 1.9.5 was a speed improvement and approach improvement version. It can now look at folders inside of folders for text files. A resource mover has also been added.
Version 2.0 was a major upgrade. This version added the window to save and print from. Also the speed was increased by 4 fold. I interface was improved for ease of learning to use. The file output was put into a tree format. Update feature added.
Version 2.1 was a minor upgrade. This version added the option in preferences that the display of the text folder differences be in Fold Edit format. This is then saved and Fold Edit is run and Open Fold... is used to start the text fold
Version 3.0 the Fold Edit compliment application has been merged with the Fold Machine. So now the Fold Machine abilities are inside of a fully functional text editor.
Procedure
• Comparing two folders of text files
This is the main function of this program. All of the preferences are aimed at this function.
You are first asked to select a file inside of the folder that contains your “working” project. Open any file inside the folder that you have been working on; this allows the Fold Machine to identify the folder. The project file is a good choice.
Next, you are asked to select a file inside of the master folder .
After your selections you are presented in a text window with the results of your compare. (If you decide to use the direct fold option, you will get the list for just a second theFold Machine will then present you with the first two files that were different in the compared folders.)
• Comparing two resource files
This is the secondary function of this program.
You are again asked to select the resource file in your working folder.
Next, you are asked to select the master resource file.
After your selections you are presented in a text window with the results of your compare.
• Updating a folder
This has become one of the most widely used features. It is similar to a backup program.
First select the folder to copy from.
Next select the folder to copy to.
You are then asked to verify your selection. Once you say Yes - the Fold Machine will copy only those files that have different modification dates. It also puts the “Master” modification date on the file after copying.
• Listing a folder
Simply select the folder you want listed. The window will fill with the files names.
• Listing a Resource
Simply select the resource you want listed. The window will give you the resTypes, Id’s and size.
Preferences
• Last Fold Date
This is the most useful preference, but the most difficult one to explain.
It frequently happens that someone else in your programming team makes changes to a master source file sometime after you made your working copy of the master folder. That file will now be different from your copy of that same file even though you have made no changes to your copy of the file. The Fold Machine, unless we take steps, will tag this file as having been changed even though you have not made any alterations to the file at all. This can waste a great deal of your time as you tediously go through the master file and your copy to confirm that all of the changes to the file were put there by someone else.
The Last Fold Date item in the preferences allows you to specify the date that you folded your previous changes into the master project. This will be the date on which you last made a copy of the master folder. Only those files in your working project that were modified after this date will be considered for comparison with the master source files. This will give you a list of only the files that you have changed since your last fold.
You should enter this date every time you fold a new set of changes into the master project. The date will be saved for the next fold.
There are two ways to enter this date:
• File...
When you hit this button you are prompted with the open file dialog. You should select any file inside your just-folded folder. (This is the folder that is becoming the new master). The Fold Machine will grab the most-recent “modified” date of the text files inside that folder.
• Enter it...
When you hit this button you are prompted with a dialog that allows you to enter the date yourself. Use this feature if you forgot to run the Fold Machine after folding the last time, but you know the date that you folded.
Be very careful setting this date. Remember that if this date is newer than some file that you worked on, the Fold Machine won’t tag that file as being changed. If you want it to ignore the date feature, set the year to 1904.
• Ignore White Space
This feature allows the text file comparisons to ignore all white space — including tabs and extra spaces — in the files. Some programmers prefer tabs, others the space bar.
• Ignore Comments
This feature allows the text file comparisons to ignore all C-style comments. I suggest that you not use this feature. People get a little tense if their documentation gets lost in the folding process.
• Font, Size and Tabsize
These are the text characteristics of the window.
• Text Fold Display
These options determine what the comparison of two folders of text files will show you.
• Diff Display
This is the standard approach. This will display the difference list by full pathnames. It is assumed that you will use your own editor to perform the comparison of these files.
• Fold Edit Export
This option allows you to export the difference of the folder comparison to the partner application Fold Edit. Fold Edit, through the Open Fold... command will present you with the files and allow you to do the individual file comparisons.
• Direct Fold
With this option selected when you compare two folders full of text files rather than presenting you with a difference list the Fold Machine will save the difference list to a temp file and do an open fold... on that file presenting you with the first two files in the compared folders that are different.
Helpful Hints
I have found it easiest to keep a copy of the master folder on my drive and do all the comparison and folding there. I start by using the update feature to get my local master up to date. then I fold the resources and then the text files. All of my folding is done by making changes to my copy of the master folder. My working version and the official master remain untouched. For all of the text folding operations, I use the Direct Fold option.
Once I have folded, I use my “local” master folder to test every function of the program. When I feel that the new master folder is sound, I make it our our official master folder. To do this quickly, I use the update feature to both the “true” master and to my local working copy. My fold is then complete. I also change the version number in the resource file and make an application each time.
I also keep a file of who folds, what time and generally what feature was folded in. That application can then be tested by all our beta testers. Give yourself the time and the patience to do the testing correctly; it is not something to take lightly.
Credits and addresses
As with any piece of software there are far too many people to thank than can be listed here. The three that can not go without mentioning are:
My father, for all that he has done to make me what I am,
Linda Johnston, now my wife for her helping me to understand the importance of appearance as well as the importance of function.
Please send any comments, suggestions or registrations to: